using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;

namespace HX.Model.Xcode.HXDB
{
    /// <summary></summary>
    [Serializable]
    [DataObject]
    [BindTable("HX_PresidentMailboxAttitude", Description = "", ConnName = "HXDB", DbType = DatabaseType.SqlServer)]
    public partial class HxPresidentmailboxattitude : IHxPresidentmailboxattitude
    {
        #region 属性
        private Int32 _ID;
        /// <summary></summary>
        [DisplayName("ID")]
        [DataObjectField(true, true, false, 10)]
        [BindColumn("ID", "", "int")]
        public Int32 ID { get => _ID; set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } } }

        private String _TaskID;
        /// <summary></summary>
        [DisplayName("TaskID")]
        [DataObjectField(false, false, true, 100)]
        [BindColumn("TaskID", "", "nvarchar(100)")]
        public String TaskID { get => _TaskID; set { if (OnPropertyChanging(__.TaskID, value)) { _TaskID = value; OnPropertyChanged(__.TaskID); } } }

        private String _Account;
        /// <summary></summary>
        [DisplayName("Account")]
        [DataObjectField(false, false, true, 100)]
        [BindColumn("Account", "", "varchar(100)")]
        public String Account { get => _Account; set { if (OnPropertyChanging(__.Account, value)) { _Account = value; OnPropertyChanged(__.Account); } } }

        private Int32 _AttitudeType;
        /// <summary>1点赞 2点踩</summary>
        [DisplayName("1点赞2点踩")]
        [Description("1点赞 2点踩")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn("AttitudeType", "1点赞 2点踩", "int")]
        public Int32 AttitudeType { get => _AttitudeType; set { if (OnPropertyChanging(__.AttitudeType, value)) { _AttitudeType = value; OnPropertyChanged(__.AttitudeType); } } }

        private DateTime _CreateTime;
        /// <summary></summary>
        [DisplayName("CreateTime")]
        [DataObjectField(false, false, true, 0)]
        [BindColumn("CreateTime", "", "date")]
        public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging(__.CreateTime, value)) { _CreateTime = value; OnPropertyChanged(__.CreateTime); } } }

        private Int32 _Plateform;
        /// <summary>1Web  2App</summary>
        [DisplayName("1Web2App")]
        [Description("1Web  2App")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn("Plateform", "1Web  2App", "int")]
        public Int32 Plateform { get => _Plateform; set { if (OnPropertyChanging(__.Plateform, value)) { _Plateform = value; OnPropertyChanged(__.Plateform); } } }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.ID: return _ID;
                    case __.TaskID: return _TaskID;
                    case __.Account: return _Account;
                    case __.AttitudeType: return _AttitudeType;
                    case __.CreateTime: return _CreateTime;
                    case __.Plateform: return _Plateform;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.ID: _ID = value.ToInt(); break;
                    case __.TaskID: _TaskID = Convert.ToString(value); break;
                    case __.Account: _Account = Convert.ToString(value); break;
                    case __.AttitudeType: _AttitudeType = value.ToInt(); break;
                    case __.CreateTime: _CreateTime = value.ToDateTime(); break;
                    case __.Plateform: _Plateform = value.ToInt(); break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得HxPresidentmailboxattitude字段信息的快捷方式</summary>
        public partial class _
        {
            /// <summary></summary>
            public static readonly Field ID = FindByName(__.ID);

            /// <summary></summary>
            public static readonly Field TaskID = FindByName(__.TaskID);

            /// <summary></summary>
            public static readonly Field Account = FindByName(__.Account);

            /// <summary>1点赞 2点踩</summary>
            public static readonly Field AttitudeType = FindByName(__.AttitudeType);

            /// <summary></summary>
            public static readonly Field CreateTime = FindByName(__.CreateTime);

            /// <summary>1Web  2App</summary>
            public static readonly Field Plateform = FindByName(__.Plateform);

            static Field FindByName(String name) => Meta.Table.FindByName(name);
        }

        /// <summary>取得HxPresidentmailboxattitude字段名称的快捷方式</summary>
        public partial class __
        {
            /// <summary></summary>
            public const String ID = "ID";

            /// <summary></summary>
            public const String TaskID = "TaskID";

            /// <summary></summary>
            public const String Account = "Account";

            /// <summary>1点赞 2点踩</summary>
            public const String AttitudeType = "AttitudeType";

            /// <summary></summary>
            public const String CreateTime = "CreateTime";

            /// <summary>1Web  2App</summary>
            public const String Plateform = "Plateform";
        }
        #endregion
    }

    /// <summary>接口</summary>
    public partial interface IHxPresidentmailboxattitude
    {
        #region 属性
        /// <summary></summary>
        Int32 ID { get; set; }

        /// <summary></summary>
        String TaskID { get; set; }

        /// <summary></summary>
        String Account { get; set; }

        /// <summary>1点赞 2点踩</summary>
        Int32 AttitudeType { get; set; }

        /// <summary></summary>
        DateTime CreateTime { get; set; }

        /// <summary>1Web  2App</summary>
        Int32 Plateform { get; set; }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}